package com.anjubao.parking.municipal.parkinglot.mapper;

import com.anjubao.parking.municipal.parkinglot.dto.ParkingLotStatusDto;
import com.anjubao.parking.municipal.parkinglot.model.ParkingLotStatus;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ParkingLotStatusMapper extends BaseMapper<ParkingLotStatus> {


    IPage<ParkingLotStatusDto> getStatusList(Page<ParkingLotStatusDto> page, @Param("cityId")Integer cityId);

    List<ParkingLotStatusDto> getSlotStatByParkingLot(@Param("parkingLotIds") List<String> parkingLotIds);

    /**
     * 批量更新停车场空闲车位信息
     * @param parkingLotStatusDto
     * @return
     */
    Integer updateFreeList(@Param("parkingLotStatusDto") ParkingLotStatusDto parkingLotStatusDto);
}
